package com.stsdai.shop.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.stsdai.manager.pojo.UnitType;
import com.stsdai.manager.service.UnitTypeService;

@Controller
@RequestMapping("unit")
public class UnitTypeController {

	@Autowired
	private UnitTypeService unitTypeService;

	/**
	 * 查询所有计量单位信息
	 * @return
	 */
	@RequestMapping(value = "list", method = RequestMethod.POST)
	@ResponseBody // 必须要加
	public List<UnitType> fandAllUnitType() {
		List<UnitType> list = this.unitTypeService.queryAll();
		return list;
	}

}
